Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

632707 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer

typer.js cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer/typer.js
191 Views
0 Comments
/* global canvas ctx animation:writable gameLoop label loop paintCircle isIntersectingRectangleWithCircle generateRandomNumber generateRandomCharCode paintParticles createParticles processParticles */
let score = 0;
let lives = 10;
let caseSensitive = true;

const center = {
x: canvas.width / 2,
y: canvas.height / 2,
canvas.js cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer/canvas.js
178 Views
0 Comments
/* global performance FPSMeter */
/* eslint-disable no-unused-vars */
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

const getTime = typeof performance === 'function' ? performance.now : Date.now;
README.md cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer/README.md
181 Views
0 Comments
# Typer

## A simple interesting typing game which can help to increase the typing speed.

* Characters can be case sensitive or insensitive.
* Wrong characters will decrease your score.
* Click on the button to change case sensitivity.
* Pause by pressing _ESC_.
typer.css cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer/typer.css
120 Views
0 Comments
* {
margin: 0;
}

canvas {
background: #f10505a5;
display: block;
}
index.html cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer/index.html
297 Views
0 Comments
<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Typer</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="typer.css">
<script>
particle.js cody/swapnilsparsh/30DaysOfJavaScript/93 - Typer/particle.js
177 Views
0 Comments
/* global canvas paintCircle generateRandomNumber generateRandomRgbColor */
/* eslint-disable no-unused-vars */
const particle = {
decrease: 0.05,
highestAlpha: 0.8,
highestRadius: 5,
highestSpeedX: 5,
highestSpeedY: 5,